<template>
  <div>
    <el-dialog title="详细信息" :visible.sync="dialogVisible" fullscreen destroy-on-close>
      <div>
        <el-card shadow>
          <h2>
            {{ form.name }}
          </h2>
          <div>
            <el-tag type="success">{{ form.username }}</el-tag>
            <el-tag type="info">{{ form.ctime }}</el-tag>
          </div>

          <div class="ocontent">
            {{ form.content }}
          </div>
        </el-card>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">关闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  dicts: [],
  components: {},

  data() {
    return {
      resolve: null,
      dialogVisible: false,

      // 表单参数
      form: {
        oid: "",
        pid: "",
        username: "",
        ctime: "",
        name: "",
        content: "",
      },
    };
  },

  created() {
    // roleService.list({}).then((res) => {
    //   this.roleOptions = res.data.data;
    // });
  },
  methods: {
    open(row) {
      // const data1 = { username: "John", phone: "123456789" };
      // const { username, phone, role = { id: "1" } } = data1;
      // console.log("test", { username, phone, role });

      this.dialogVisible = true;
      this.form = row;

      return new Promise((resolve) => {
        this.resolve = resolve;
      });
    },

    // 取消按钮
    cancel() {
      this.dialogVisible = false;
      // this.reset();
    },
  },
};
</script>

<style lang="scss" scoped>
.ocontent {
  line-height: 30px;
  font-size: 16px;
  /* height: 200px; */
  display: -webkit-box; /* 使用弹性盒子布局 */
  -webkit-box-orient: vertical; /* 设置垂直方向 */

}
</style>
